package org.zfes.snowier.zbss.xzy.router.user.member;

import java.util.List;
import java.util.Map;

import org.springframework.http.MediaType;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile;
import org.zfes.snowier.auth.shiro.util.SecurityUtil;
import org.zfes.snowier.web.controller.BaseController;
import org.zfes.snowier.zbss.xzy.member.MemberDto;
import org.zfes.snowier.zbss.xzy.member.MemberRegistDto;

import com.google.common.collect.Lists;

import io.swagger.annotations.ApiOperation;

@Controller("org.zfes.snowier.zbss.xzy.router.user.member.MemberController") 
@RequestMapping("/api/user/member")
public class MemberController  implements BaseController{

	  @ApiOperation(value = "注册家庭成员")
	  @RequestMapping(value="/registFamilyMember", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
	   public @ResponseBody  Object registFamilyMember(@RequestBody MemberRegistDto member){
		    
		  return ajaxDoneSuccess("数据操作成功 ");
	  }
	  

		
	  @ApiOperation(value = "家庭成员列表加载")
		@RequestMapping(value="/loadMembers", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
		public  @ResponseBody Object loadMembers() {
		  
		  Long tenantId =  SecurityUtil.getTenantId();
		  
		  List<MemberDto> memberList=Lists.newArrayList();
			 
		  return ajaxDoneSuccess("数据操作成功 ").put("memberList", memberList);
		}
		
		
		@RequestMapping(value="/removerMember/{userId}", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
		public  @ResponseBody Object removerMember(@PathVariable("userId")Long userId ) {
		   List<MemberDto> memberList=Lists.newArrayList();
			 
		   return ajaxDoneSuccess("数据操作成功 ").put("memberList", memberList);
		}
}
